import React, { useEffect, useState } from 'react';

const Index = () => {
  const [list, setList] = useState([]);

 
  useEffect( () => {
    // 请求数据

    // 不能写async 
    setList(['a', 'b', 'c', 'd', 'e'])
  }, [])
  return (
    <div>
      <ul>
        {
          list.map((v, i) => {
            return <li key={ i }>{ v }</li>
          })
        }
      </ul>
    </div>
  );
}

export default Index;
